package com.missilike.domain.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.RandomStringUtils;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.UUID;

@NoArgsConstructor
@Data
public class MilAccountDO {

    public MilAccountDO(String password, String phone, String deviceCode) {
        this.id = UUID.randomUUID().toString();
        this.password = password;
        this.phone = phone;
        this.deviceCode = deviceCode;
        this.isMember = false;
        this.accountLevel = 1;
        this.experience = 0;
        this.lastBalance = new BigDecimal(0);
        this.rewardIncrease = new BigDecimal(0);
        this.status = 1;
        this.registerTime = LocalDateTime.now();
        this.lastLoginTime = LocalDateTime.now();
    }

    /**
     * uuid
     */
    private String id;

    /**
     * 登录账号
     */
    private Long account;

    /**
     * 密码
     */
    private String password;

    /**
     * 昵称
     */
    private String nickName;

    /**
     * 注册手机
     */
    private String phone;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 设备号
     */
    private String deviceCode;

    /**
     * 是否付费会员
     */
    private Boolean isMember;

    /**
     * 账号等级
     */
    private Integer accountLevel;

    /**
     * 经验值
     */
    private Integer experience;

    /**
     * 性别
     * 0-男  1 -女
     */
    private Integer gender;

    /**
     * 身份标识
     */
    private String identificationCode;

    /**
     * 糜金余额
     */
    private BigDecimal lastBalance;

    /**
     * 打赏递增
     */
    private BigDecimal rewardIncrease;

    /**
     * 状态(1-正常,2-禁用,3-封号)
     */
    private Integer status;

    /**
     * 注册时间
     */
    private LocalDateTime registerTime;

    private LocalDateTime lastLoginTime;
}
